home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2006 May / PCWMAY06.iso / Software / Freeware / First Page 2006 3.00 / fp2006-final-3.00-setup.exe / {app} / Iscripts / Forms Misc / dictionary.izs < prev    next >
Text File  |  2005-09-28  |  4KB  |  156 lines

  1. <!NOWIZARD>
  2.  
  3. <!TITLE>Dictionary 
  4. <!/TITLE>
  5.  
  6. <!DESCRIPTION>This script tells you the definition of a word that you type, a quick dictionary! also has thesaurus!<!/DESCRIPTION> 
  7.  
  8. <!CATEGORY>Forms<!/CATEGORY>
  9.  
  10. <!SCRIPT>
  11. <!-- START OF SCRIPT -->
  12.  
  13.  
  14. <!-- HOW TO INSTALL DICTIONARY:
  15.  
  16.   1.  Copy code into the HEAD section of document
  17.   2.  Put last coding into the BODY section of document  -->
  18.  
  19. <!-- STEP ONE: Add code into HEAD section of document  -->
  20.  
  21. <HEAD>
  22.  
  23. <SCRIPT LANGUAGE="JavaScript">
  24.  
  25.  
  26. <!-- Begin
  27. function jump2form() {
  28.   document.dict_form.term.select();
  29.   document.dict_form.term.focus();
  30. }
  31. function isblank(s)
  32. {
  33.   for(var i = 0; i < s.length; i++) {
  34.     var c = s.charAt(i);
  35.     if ((c != ' ') && (c != '\n') && (c != '\t')) return false;
  36.   }
  37.   return true;
  38. }
  39. function formcheck() {
  40.   var d = document.dict_form.db[1].checked;
  41.   var e = document.dict_form.term.value;
  42.   if ((e == null) || (e == "") || isblank(e)) {
  43.     alert("Please enter a word to look up.");
  44.     jump2form();
  45.   }
  46.   else if (d == 1) {
  47.     location.href = ("http://www.thesaurus.com/cgi-bin/search?config=roget&words=" + escape(e));
  48.   }
  49.   else {
  50.     location.href= ("http://www.dictionary.com/cgi-bin/dict.pl?term=" + escape(e));
  51.   }
  52.   return false;
  53. }
  54. function ahdpop() {
  55. win=window.open("http://www.dictionary.com/help/ahd3key.html",'AHDKey','width=500,height=330,toolbar=no,location=no,directories=no,menubar=no,scrollbars=yes,resizable=yes');
  56.   return false;
  57. }
  58. //  End -->
  59. </script>
  60.  
  61. </HEAD>
  62.  
  63. <!-- STEP TWO: Add code into BODY section of document  -->
  64.  
  65. <BODY>
  66.  
  67. <FORM NAME="dict_form" METHOD="GET" ACTION="/cgi-bin/dict.pl" onsubmit="return formcheck();">
  68. <center>
  69. <h2>Look up:</h2>
  70. <INPUT TYPE="text" NAME="term" SIZE=17 MAXLENGTH=48 VALUE="" style="font-size:11pt;"> 
  71. <INPUT TYPE="submit" VALUE="OK" STYLE="font-size:11pt;">
  72. <h3>Search:</h3>
  73. <INPUT TYPE="RADIO" NAME="db" VALUE="*" CHECKED>Dictionary   
  74. <INPUT TYPE="RADIO" NAME="db" VALUE="roget">Thesaurus
  75. </center>
  76. </FORM>
  77.  
  78.  
  79.  
  80. <!-- END OF SCRIPT -->
  81. <!/SCRIPT>
  82.  
  83. <!PREVIEW>
  84. <!-- START OF SCRIPT -->
  85.  
  86. <!-- HOW TO INSTALL DICTIONARY:
  87.  
  88.   1.  Copy code into the HEAD section of document
  89.   2.  Put last coding into the BODY section of document  -->
  90.  
  91. <!-- STEP ONE: Add code into HEAD section of document  -->
  92.  
  93. <HEAD>
  94.  
  95. <SCRIPT LANGUAGE="JavaScript">
  96.  
  97.  
  98. <!-- Begin
  99. function jump2form() {
  100.   document.dict_form.term.select();
  101.   document.dict_form.term.focus();
  102. }
  103. function isblank(s)
  104. {
  105.   for(var i = 0; i < s.length; i++) {
  106.     var c = s.charAt(i);
  107.     if ((c != ' ') && (c != '\n') && (c != '\t')) return false;
  108.   }
  109.   return true;
  110. }
  111. function formcheck() {
  112.   var d = document.dict_form.db[1].checked;
  113.   var e = document.dict_form.term.value;
  114.   if ((e == null) || (e == "") || isblank(e)) {
  115.     alert("Please enter a word to look up.");
  116.     jump2form();
  117.   }
  118.   else if (d == 1) {
  119.     location.href = ("http://www.thesaurus.com/cgi-bin/search?config=roget&words=" + escape(e));
  120.   }
  121.   else {
  122.     location.href= ("http://www.dictionary.com/cgi-bin/dict.pl?term=" + escape(e));
  123.   }
  124.   return false;
  125. }
  126. function ahdpop() {
  127. win=window.open("http://www.dictionary.com/help/ahd3key.html",'AHDKey','width=500,height=330,toolbar=no,location=no,directories=no,menubar=no,scrollbars=yes,resizable=yes');
  128.   return false;
  129. }
  130. //  End -->
  131. </script>
  132.  
  133. </HEAD>
  134.  
  135. <!-- STEP TWO: Add code into BODY section of document  -->
  136.  
  137. <BODY>
  138.  
  139. <FORM NAME="dict_form" METHOD="GET" ACTION="/cgi-bin/dict.pl" onsubmit="return formcheck();">
  140. <center>
  141. <h2>Look up:</h2>
  142. <INPUT TYPE="text" NAME="term" SIZE=17 MAXLENGTH=48 VALUE="" style="font-size:11pt;"> 
  143. <INPUT TYPE="submit" VALUE="OK" STYLE="font-size:11pt;">
  144. <h3>Search:</h3>
  145. <INPUT TYPE="RADIO" NAME="db" VALUE="*" CHECKED>Dictionary   
  146. <INPUT TYPE="RADIO" NAME="db" VALUE="roget">Thesaurus
  147. </center>
  148. </FORM>
  149.  
  150.  
  151.  
  152. <!-- END OF SCRIPT -->
  153. <!/PREVIEW>
  154.  
  155. <!RELATED>NONE<!/RELATED>
  156.